package com.example.demo.Dao;

import com.example.demo.Annotation.Log;
import com.example.demo.entity.Person;
import lombok.Data;

/**
 * @Author : 叶荻风
 * @create : 2024/5/20 16:10
 */

public class PersonDaoImpl implements PersonDao{
    @Override
    public void save(Person person) {
        System.out.println(person+" save!");
    }

    @Override
    public Person queryByName(String name) {
        Person person = new Person();
        person.setName("dada");
        return person;
    }

    @Override
    @Log
    public Person queryByName(String name, int age) {
        Person person = new Person();
        person.setName("baba");
        person.setAge(20);
        return person;
    }
}
